package cn.jjxx.modules.portal.dto;

import cn.jjxx.modules.portal.enums.LoginModeEnum;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

/**
 * 登录接口的数据传输对象
 * @author mali
 * @date 2020-02-11
 */
public class LoginDto {

    /** 用户名 */
    @NotBlank(message = "用户名不能为空")
    private String username;
    /** 密码 */
    private String password;
    /** 短信验证码 */
    private String smsCode;
    /** jsp验证码 */
    private String jcaptchaCode;
    /** 记住我 */
    private Boolean rememberMe = Boolean.FALSE;
    /** 登录方式类型 */
    @Pattern(regexp = "(10|20)", message = "登录方式类型不合法")
    private Integer loginMode = LoginModeEnum.PASSWORD.getCode();
    /** 是否移动端登录 */
    private Boolean mobileLogin = Boolean.FALSE;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }

    public String getJcaptchaCode() {
        return jcaptchaCode;
    }

    public void setJcaptchaCode(String jcaptchaCode) {
        this.jcaptchaCode = jcaptchaCode;
    }

    public Boolean getRememberMe() {
        return rememberMe;
    }

    public void setRememberMe(Boolean rememberMe) {
        this.rememberMe = rememberMe;
    }

    public Integer getLoginMode() {
        return loginMode;
    }

    public void setLoginMode(Integer loginMode) {
        this.loginMode = loginMode;
    }

    public Boolean getMobileLogin() {
        return mobileLogin;
    }

    public void setMobileLogin(Boolean mobileLogin) {
        this.mobileLogin = mobileLogin;
    }
}
